package com.ruoyi.framework.utils;

// 定义一个枚举类
public enum sqResponseStatus {
    SUCCESS(200, "Success"),
    REPEAT_ACCOUNT(9001,"账号重复"),
    NOT_EXIST_ACCOUNT(9002,"账号不存在"),
    PASSWORD_ERROR(9003,"密码错误"),
    REPEAT_CATEGORY(9004,"类别重复"),
    REPEAT_BRAND(9004,"品牌重复"),
    REPEAT_MATERIAL(9005,"材质重复"),
    REPEAT_PRODUCT(9006,"产品重复"),
    CODE_EXIST(9007,"验证码还在有效期"),
    CODE_ERROR(9008,"验证码错误或已过期"),
    NOT_SHELVES_NUM(9009,"当前商品数量不足"),
    ERROR(9999,"程序错误或执行失败"),
    UNAUTHORIZED(401, "token过期"),
    TOKEN_ERROR(8889, "token异常");

    // 枚举类的字段
    private final int statusCode;
    private final String statusMessage;

    // 枚举类的构造方法
    sqResponseStatus(int statusCode, String statusMessage) {
        this.statusCode = statusCode;
        this.statusMessage = statusMessage;
    }

    // 枚举类的方法
    public int getStatusCode() {
        return statusCode;
    }

    public String getStatusMessage() {
        return statusMessage;
    }
}

